<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/search.css" />
<link type="text/css" rel="stylesheet" href="css/jquery.fancybox.css" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
		$(document).ready(function() {
			$('.fancybox').fancybox();
		});
</script>



<script type="text/javascript">
$(window).load(function(){  

$("#content img").each(function(){
   	 var width=$(this).width();
	 var height=$(this).height();
	 width=220;
	 height=280;
	 $(".item_pic").css("width",width);
	 $(".item_pic").css("height",height);
	});

 })
</script>
<title>search</title>
</head>

<body>
	<div id="container">
	
		<div id="navi_container">
			<!--这里是navigation的顶部栏-->
			<div id="navi_top">
				<div class="navi_left">南昌站</div>
				<div class="navi_left">网页版</div>
				
				<div class="navi_right">推广使用</div>
				
			<c:choose>
               <c:when test="${sessionScope.nickName==null}">
               <div class="navi_right"><a href="#">注册</a></div>
               <div class="navi_right"><a href="user/login_queryLoginPage.action">登录</a></div>
               </c:when>                 
          	  <c:otherwise>
          	  
          	  <div class="navi_right"><a  href="user/PersonSpace_queryMsgStore.action">我的收藏</a></div>
          	  <div class="navi_right"><a href="user/login_doLogout.action">注销</a></div>
          	  <div class="navi_right"><a target="right" href="user/PersonSpace_queryLabelMsg.action">欢迎${sessionScope.nickName}</a></div>
          	 </c:otherwise>
        	</c:choose>
        	
        	
			</div>
			<!--这里是navigation的顶部栏-->
			
			<!--导航栏-->
			<div id="navigation">
				<div id="logo"><a href="#"><img src="img/logo.png" width="220" height="70" border="0"/></a></div>
				<a href="index.action"><div class="navigator">首页</div></a>
				<c:forEach  var="catagory"  items="${list}"   varStatus="s">
				   <a href="user/publish_queryCataSecondList.action?catagoryId=${catagory.catagoryID}"><div class="navigator">${catagory.catagoryName}</div></a>
				</c:forEach>
			</div>
			<!--导航栏-->
		</div>
		
	  <div id="content">
	  	  <div id="search_notice">搜索结果</div>
	  
	  
	    <c:forEach  var="msg"  items="${page.list}">
	         <!--这里是一条记录-->
			  <div id="item">
					<div>
					    <img src="img/item.png" id="span_logo"/>
						<span id="search_title"><a  href="user/publish_queryPubMsg.action?pubMsg.publishID=${msg.publishID}">${msg.title}</a></span>
						<div id="search_post_time">${msg.postTime}</div>
					</div>
					<!-- <div id="search_content">這裡開始時內容，不要擔心長度問題</div> -->
					<div>
						<a class="fancybox" href="${msg.cover}" data-fancybox-group="gallery" title="点击查看大图">
							<img src="${msg.cover}" class="item_pic" />
						</a>
					</div>
			 </div>
	 	  <!--这里是一条记录-->
	    </c:forEach>
	 	  

	 	  <!--这里是一条记录-->
		  <!-- <div id="item">
				<div>
					<img src="img/item.png" id="span_logo"/>
					<span id="search_title">111</span>
					<div id="search_post_time">2013/5/25</div>
				</div>
				<div id="search_content">這裡開始時內容，不要擔心長度問題</div>
				<div>
					<a class="fancybox" href="img/bar_item1.jpg" data-fancybox-group="gallery" title="点击查看大图">
						<img src="img/bar_item1.jpg" class="item_pic" />
					</a>
				</div>
		 </div> -->
	 	  <!--这里是一条记录-->

	  </div>
		
		<div style=" width:100%;border-bottom:2px solid #6eb205"></div>
		<div id="footer">copyright &copy; 江西师范大学 Evan &amp; ZTS</div>
	</div>
</body>
</html>
